<extend name="Layout:layout_dialog" />
<block name="body_main">
    <form action="{:U('content_edit_save')}" method="post" class="xsui-form" enctype="multipart/form-data" style="height:450px;">
        <fieldset>
            <div class="xsui-form-field">
                <label>标题：</label>
                <input type="text" name="title" value="{$data.title}" placeholder="标题" required="required" size="35" />
            </div>
            <div class="xsui-form-field">
                <label>链接地址：</label>
                <input type="text" name="link_url" value="{$data.link_url|default='###'}" placeholder="链接地址" title="图片点击跳转地址" required="required" size="31" />
            </div>
            <div class="xsui-form-field">
                <label>链接对象：</label>
                <input type="text" name="target" value="{$data.target|default='_self'}" placeholder="链接打开方式(_blank,_self,iframe名称等)" title="链接打开方式" required="required" size="31" />
            </div>
            <div class="xsui-form-field">
                <label>图片：</label>
                <sohtml:file name="file_path" value="{$data.file_path}" />
            </div>
            <div class="xsui-form-field">
                <label>有效期：</label>
                <input type="number" name="duration_time" value="{$data.duration_time|default=0}" required="required" size="10" />
                <sohtml:select name="duration_unit" items="Y:年;M:月;D:天;H:小时;M:分钟" value="{$data.duration_unit}" />
            </div>
            <div class="xsui-form-field">
                <label>生效时间：</label>
                <input type="text" name="begin_time" value="{$data.begin_time}" class="datetimepicker" placeholder="生效时间" />
            </div>
            <div class="xsui-form-field">
                <label>失效时间：</label>
                <input type="text" name="end_time" value="{$data.end_time}" class="datetimepicker" placeholder="失效时间" />
            </div>
            <div class="xsui-form-field">
                <label>备注：</label>
                <input type="text" name="remark" value="{$data.remark}" placeholder="备注" size="35" />
            </div>
            <div class="xsui-form-field xsui-form-mgb">
                <label>状态：</label>
                <sohtml:radio name="status" items="1:显示;0:隐藏" value="{$data.status|default=1}" required="required" />
            </div>
        </fieldset>
        <button type="submit" class="ui-state-default"><i class="fa fa-save"></i>保存</button>
        <button type="reset" class="ui-state-default">重置</button>
        <input type="hidden" name="id" value="{$data.id}"/>
        <input type="hidden" name="advertising_id" value="{$data.advertising_id}"/>
    </form>
</block>